﻿using Cngot.Extensions.Logger.Enrichers;

namespace Cngot.Extensions.Logger
{
    public static class TraceLoggerConfigurationExtensions
    {
        public static LoggerConfiguration WithServerIp(this LoggerEnrichmentConfiguration enrichmentConfiguration)
        {
            if (enrichmentConfiguration == null)
                throw new ArgumentNullException(nameof(enrichmentConfiguration));
            return enrichmentConfiguration.With(new ServerIpEnricher());
        }

        public static LoggerConfiguration WithTrace(this LoggerEnrichmentConfiguration enrichmentConfiguration)
        {
            if (enrichmentConfiguration == null)
                throw new ArgumentNullException(nameof(enrichmentConfiguration));

            return enrichmentConfiguration.With<TraceEnricher>();
        }
    }
}